#pragma once
#include "MeasureSolution.h"
#include "afxwin.h"


// CProjectSwitch dialog

class CProjectSwitch : public CDialogEx
{
	DECLARE_DYNAMIC(CProjectSwitch)

public:
	CProjectSwitch(CWnd* pParent, const CMeasureSolution &sln);
	virtual ~CProjectSwitch();

// Dialog Data
	enum { IDD = IDD_PROJECT_SWITCH };

protected:
	virtual void DoDataExchange(CDataExchange* pDX);
  virtual BOOL OnInitDialog();

	DECLARE_MESSAGE_MAP()

public:
  afx_msg void OnProjectListSelChange();

public:
  tstring ActiveProjectName(void)
  {
    return active_project_name_.GetBuffer(0);
  }

  tstring ActiveProjectDirectory(void)
  { 
    return active_project_directory_.GetBuffer(0);
  }

  int ActiveProjectIndex(void) const { return active_project_index_; }

private:
  const CMeasureSolution& solution_;
  CString active_project_name_;
  CString active_project_directory_;
  int active_project_index_;

  CListBox wnd_project_list_;
  CButton wnd_project_switch_;
};
